package com.example.zzh.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.zzh.entity.ZzhProductUnit;
import com.example.zzh.mapper.ZzhProductUnitMapper;
import com.example.zzh.service.ZzhProductUnitService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 多单位表 服务实现类
 * </p>
 *
 * @author zzh
 * @since 2023-08-12
 */
@Service
public class ZzhProductUnitServiceImpl extends ServiceImpl<ZzhProductUnitMapper, ZzhProductUnit> implements ZzhProductUnitService {

    @Resource
    private ZzhProductUnitMapper zzhProductUnitMapper;

    @Override
    public IPage pageName(Page<ZzhProductUnit> page) {
        return zzhProductUnitMapper.pageName(page);
    }

    @Override
    public IPage pageNames(Page<ZzhProductUnit> page, Wrapper wrapper) {
        return zzhProductUnitMapper.pageNames(page,wrapper);
    }

    @Override
    public ZzhProductUnit getProductById(Long id) {
        return zzhProductUnitMapper.selectById(id);
    }
}
